<!-- ./skins/tpl/domain/domain.tpl begin -->
<?if(!empty($info)):?>
<div style="background-color:#aaa;width:50%;line-height:25px;font:12px sans-serif;color:red;border:1px solid red;padding:5px;"><?php echo getInfo($info); ?></div>
<?endif?>
<div style="padding:10px;">
<h2><?=$d['d_caption']?></h2>

<?if(!empty($d['d_description'])):?>
<h3>Описание:</h3>
<p><?=$d['d_description']?></p>
<?endif?>

<form class="send" action="" method="post">  
Пригласить, используя адрес электронной почты:<br />
 <input class="caption" style="border:2px solid gray;" name="form[value2]" type="text" />
 <input class="button" name="ok" type="submit" value="Отправить"><br />
</form>

<?if(!empty($d_a)):?>
	<h3>Активы:</h3>
	<?foreach($d_a as $d_a_key => $a):?>
		<span><a href="index.php?page=assets&rem=asset&view=default&id=<?=$a['a_id']?>"><?=$a['a_caption']?></a>, </span>
	<?endforeach?>
<?endif?>

<?if(!empty($dom_requests)):?>
	<h3>Заявки, о вступлении:</h3>
	<form class="send" action="" method="post">
		<style>
			table.user_req,table.user_req td,table.user_req th{border:1px solid gray;}
			table.user_req td{padding:5px;}
		</style>
		<table class="user_req">
			<tr>
				<th>Принять</th>
				<th>Отказать</th>
				<th>Отложить</th>
				<th>Пользователь</th>
				<th>Дата</th>
			</tr>
		<?foreach($dom_requests as $d_r_key => $d_r):?>
			<tr>
				 <td>
					<input name="form[array1][<?=$d_r['id']?>][status]" type="radio" value="accept" />
				 </td>
				 <td>
					<input name="form[array1][<?=$d_r['id']?>][status]" type="radio" value="deny" />
				 </td>
				 <td>
					<input name="form[array1][<?=$d_r['id']?>][status]" type="radio" value="none" />
				 </td>
				 <td>
					<a href="index.php?page=members&rem=member&view=default&id=<?=$d_r['user_id']?>"><?=$d_r['u_caption']?></a>
				 </td>
				 <td>
					<?=$d_r['create_date']?>
				 </td>
			</tr>
			<input type="hidden" name="form[array1][<?=$d_r['id']?>][user_id]" value="<?=$d_r['user_id']?>"/>
		<?endforeach?>
		</table>
		<input class="button" name="ok" type="submit" value="Отправить"><br />
	</form>
<?endif?>

<?if(!empty($d_u)):?>
<h3>Список пользователей</h3>
<table class="users">
	<thead>
		<tr>
			<th rowspan="2">Ид</td>
			<th rowspan="2">Имя</td>
			<th colspan="4">Роль</td>
		</tr>
		
		<tr>
			<th>Пр.</th>
			<th>Поль.</th>
			<th>Мод.</th>
			<th>Админ</th>
		</tr>
	</thead>
	
	<tbody>
	<?foreach($d_u as $du_key => $u):?>
	<tr>
		<td><?=$u['u_id']?></td>
		<td><?=$u['u_caption']?></td>
		<td><input type="radio" name="form[array1][<?=$u['u_id']?>]" value="1" <?if($u['u_role'] == 1) echo 'checked';?>/></td>
		<td><input type="radio" name="form[array1][<?=$u['u_id']?>]" value="10" <?if($u['u_role'] == 10) echo 'checked';?>/></td>
		<td><input type="radio" name="form[array1][<?=$u['u_id']?>]" value="100" <?if($u['u_role'] == 100) echo 'checked';?>/></td>
		<td><input type="radio" name="form[array1][<?=$u['u_id']?>]" value="1000" <?if($u['u_role'] == 1000) echo 'checked';?>/></td>
	</tr>	
	<?endforeach?>
	</tbody>
</table>
<?endif?>

<a href="<?=href('page=domains','rem=read')?>">Назад к доменам</a>
</div>
<!-- ./skins/tpl/domain/domain.tpl end -->